The exponential moving average gives more weight to the latest prices and includes all of the price data in the life of the instrument. It is defined by taking:
(previous period's exponential moving average)/(N+1) and adding (current price)*2/(N+1).
For the first period we take the simple average as above.
To apply a Exponential Moving Average